import { baseUrl, doRequestPost, doRequestDel, doRequestPut, doRequestGet } from '@/utils/request'

export function userList(query) {
  return doRequestPost(baseUrl + 'cms/user/class/listAll' + '?time=' + (+new Date()), query)
}

export function getUserName(query) {
  return doRequestPost(baseUrl + 'cms/user/class/get/userName/' + query.userCode + '?time=' + (+new Date()), {})
}

export function addUserClass(query) {
  return doRequestPost(baseUrl + 'cms/user/class/add' + '?time=' + (+new Date()), query)
}

export function updateUserClass(query) {
  return doRequestPost(baseUrl + 'cms/user/class/update' + '?time=' + (+new Date()), query)
}

export function deleteUserClass(query) {
  return doRequestPost(baseUrl + 'cms/user/class/delete/' + query.userCode + '?time=' + (+new Date()), {})
}

export function getUserClass(query) {
  return doRequestGet(baseUrl + 'cms/user/class/get/edit/' + query.userCode + '?time=' + (+new Date()), {})
}

export function getAllDataDict(query) {
  return doRequestPost(baseUrl + 'cms/dataDict/listAll' + '?time=' + (+new Date()), query)
}

export function getDataDict(query) {
  return doRequestGet(baseUrl + 'cms/dataDict/get/' + query.id + '?time=' + (+new Date()), {})
}

export function addDataDict(query) {
  return doRequestPost(baseUrl + 'cms/dataDict/add' + '?time=' + (+new Date()), query)
}

export function deleteDataDict(query) {
  return doRequestPost(baseUrl + 'cms/dataDict/delete/' + query.id + '?time=' + (+new Date()), {})
}

export function updateDataDict(query) {
  return doRequestPost(baseUrl + 'cms/dataDict/update' + '?time=' + (+new Date()), query)
}

export function getTypeDict(query) {
  return doRequestPost(baseUrl + 'cms/dataDict/list/' + query.type + '?time=' + (+new Date()), {})
}

export function tagCompilerAdd(query) {
  return doRequestPost(baseUrl + 'news/content/add' + '?time=' + (+new Date()), query)
}

export function tagCompilerDelete(query) {
  return doRequestPost(baseUrl + 'news/content/batchDelete/' + '?time=' + (+new Date()), query)
}

export function tagCompilerUpdate(query) {
  return doRequestPost(baseUrl + 'news/content/update' + '?time=' + (+new Date()), query)
}

export function tagCompilerList(query) {
  return doRequestPost(baseUrl + 'news/content/list' + '?time=' + (+new Date()), query)
}

export function operationRecordList(query) {
  return doRequestPost(baseUrl + 'cms/log/list' + '?time=' + (+new Date()), query)
}

export function operationRecordEnum() {
  return doRequestGet(baseUrl + 'cms/log/enum' + '?time=' + (+new Date()), {})
}

